package io;

import java.io.FileOutputStream;
import java.io.IOException;

public class FOSDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fis = new FileOutputStream("fos.txt");
        byte[] bytes = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
        fis.write(57);
        fis.write("\r\n".getBytes());
        fis.write(bytes);
        fis.write(bytes, 3, 5);//写数组时自动换行
        fis.close();
        /*      FileOutputStream fos = new FileOutputStream("fos.txt");
       fos.write(1);
        fos.close();*/
    }
}
